/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.suli.wcs.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import me.zhengjie.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
* @website https://eladmin.vip
* @description /
* @author Allen Gao
* @date 2024-02-04
**/
@Entity
@Data
@Table(name="agv_tasks")
public class AgvTasks extends BaseEntity implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "ID")
    private String id;

    @Column(name = "`status`")
    @ApiModelProperty(value = "任务状态")
    private Integer status;

    @Column(name = "`task_group_code`")
    @ApiModelProperty(value = "任务组号")
    private String taskGroupCode;

    @Column(name = "`bill_number`")
    @ApiModelProperty(value = "WMS单据号")
    private String billNumber;

    @Column(name = "`task_type`")
    @ApiModelProperty(value = "任务类型")
    private String taskType;

    @Column(name = "`group_priority`")
    @ApiModelProperty(value = "组优先级")
    private Integer groupPriority;

    public void copy(AgvTasks source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
